import React, { Component } from 'react'
import { Router, Switch, Route } from 'react-router-dom'
import Layout from './page/Layout'
import Login from './page/Login'
import AuthRoute from 'utils/AuthRoute'
import history from 'utils/history'
export default class App extends Component {
    render() {
        return (
            <Router history={history}>
                <div className='App'>
                    <Switch>
                        <Route path='/login' component={Login} />
                        <Route path='/' render={props =>
                            AuthRoute(props, Layout)} />
                    </Switch>
                </div>
            </Router>
        )
    }
}
